Package com.fsf.news.renderer
Class HtmlRendererTest
java.lang.Object
com.fsf.news.renderer.HtmlRendererTest
Unit tests for the HtmlRenderer class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidTests that the addElement method adds an element and returns the renderer instance.(package private) voidTests that the getElements method returns the expected elements when available.(package private) voidTests that the getElements method returns an empty list when no elements are available.(package private) voidTests that the render method returns an empty string when no elements are added.(package private) voidTests that the render method returns the expected HTML when an empty element is added.
-
Field Details
-
renderer
@InjectMocks com.fsf.news.renderer.HtmlRenderer renderer
-
-
Constructor Details
-
HtmlRendererTest
HtmlRendererTest()
-
-
Method Details
-
testGetElementsEmpty
@Test void testGetElementsEmpty()Tests that the getElements method returns an empty list when no elements are available. -
testGetElements
@Test void testGetElements()Tests that the getElements method returns the expected elements when available. -
testAddElement
@Test void testAddElement()Tests that the addElement method adds an element and returns the renderer instance. -
testRenderEmptyElement
@Test void testRenderEmptyElement()Tests that the render method returns the expected HTML when an empty element is added. -
testRenderEmpty
@Test void testRenderEmpty()Tests that the render method returns an empty string when no elements are added.
-